<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Código-Fonte de cross_over.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Gerado por Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Busca');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Busca" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;Arquivos</span></a></li>
      <li><a href="globals.html"><span>Arquivos&nbsp;Membros</span></a></li>
    </ul>
  </div>
<h1>cross_over.h</h1><a href="cross__over_8h.html">Vá para a documentação deste arquivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef CROOS_OVER_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define CROOS_OVER_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="genetic__operator_8h.html">genetic_operator.h</a>&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="definitions_8h.html">definitions.h</a>&quot;</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="comment">/* ----------------------------------------*/</span>
<a name="l00022"></a>00022 <span class="comment">/* ----------------------------------------*/</span>
<a name="l00023"></a>00023 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _ty = GAtype,<span class="keyword">typename</span> _realTy = GAreal_type&gt; <span class="keyword">class </span><a class="code" href="classcross__over.html">cross_over</a>;
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="comment">/* ----------------------------------------*/</span>
<a name="l00032"></a>00032 <span class="comment">/* ----------------------------------------*/</span>
<a name="l00033"></a>00033 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00034"></a><a class="code" href="classcross__over.html">00034</a> <span class="keyword">class </span><a class="code" href="classcross__over.html">cross_over</a> : <span class="keyword">public</span> <a class="code" href="classgenetic__operator.html">genetic_operator</a>&lt;_ty,_realTy&gt;
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036   <span class="keyword">public</span>:
<a name="l00037"></a>00037 
<a name="l00038"></a>00038     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00048"></a>00048     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00049"></a>00049     <a class="code" href="classcross__over.html#aa3561392e40e80aec88cc88aab4f988d">cross_over</a> (<a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;</a>* _to_apply_operator = NULL,
<a name="l00050"></a>00050                 <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; number_coordinate = def::genetic_operator::cross_over::number_coordinate,
<a name="l00051"></a>00051                 <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; probability = def::genetic_operator::cross_over::probability,
<a name="l00052"></a>00052                 <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; CP = 9,
<a name="l00053"></a>00053                 <span class="keyword">const</span> <span class="keywordtype">bool</span>&amp; aleatory = <span class="keyword">true</span>);
<a name="l00054"></a>00054 
<a name="l00055"></a>00055     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00061"></a>00061     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00062"></a><a class="code" href="classcross__over.html#a62fa09dbf5e970644ea151d78ce8e2eb">00062</a>     <span class="keyword">const</span> <span class="keywordtype">bool</span>&amp; <a class="code" href="classcross__over.html#a62fa09dbf5e970644ea151d78ce8e2eb">IsAleatory</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> _aleatory;}
<a name="l00063"></a>00063 
<a name="l00064"></a>00064     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00070"></a>00070     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00071"></a><a class="code" href="classcross__over.html#a69f0a44b51940c67f996e9da5cda250b">00071</a>     <span class="keywordtype">void</span> <a class="code" href="classcross__over.html#a69f0a44b51940c67f996e9da5cda250b">SetAleatory</a> (<span class="keyword">const</span> <span class="keywordtype">bool</span>&amp; new_aleatory) {_aleatory = new_aleatory;}
<a name="l00072"></a>00072 
<a name="l00073"></a>00073     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00077"></a>00077     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00078"></a>00078     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcross__over.html#a241401bf77d5c8c465991baa90b1d01b">MakePairs</a> (<span class="keywordtype">void</span>);
<a name="l00079"></a>00079 
<a name="l00080"></a>00080     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00090"></a>00090     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00091"></a>00091     <span class="keywordtype">bool</span> <a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">CrossOver</a> ( <a class="code" href="classcoordinate.html">coordinate&lt;_ty,_realTy&gt;</a>&amp; c1, <a class="code" href="classcoordinate.html">coordinate&lt;_ty,_realTy&gt;</a>&amp; c2,<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; CP);
<a name="l00092"></a>00092 
<a name="l00093"></a>00093   <span class="keyword">protected</span>:
<a name="l00094"></a>00094 
<a name="l00095"></a>00095     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00103"></a>00103     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00104"></a>00104     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">CrossOver</a> (_ty&amp; coord_1, _ty&amp; coord_2,<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; CP);
<a name="l00105"></a>00105 
<a name="l00106"></a>00106     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00114"></a>00114     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00115"></a>00115     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>&amp; <a class="code" href="classcross__over.html#a1a840a73fa36cc7f4f7e769f78d73e81">WalkOnPopulationHook</a> (<a class="code" href="classindividual.html">individual&lt;_ty,_realTy&gt;</a>&amp; <span class="keywordtype">id</span>); 
<a name="l00116"></a>00116 
<a name="l00117"></a>00117     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00125"></a>00125     <span class="comment">/* ----------------------------------------*/</span>
<a name="l00126"></a>00126     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>&amp; <a class="code" href="classcross__over.html#a1febad7c46ec396173e099372d50839e">WalkOnIndividualHook</a> (<a class="code" href="classcoordinate.html">coordinate&lt;_ty,_realTy&gt;</a>&amp; coo);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128     
<a name="l00129"></a>00129   <span class="keyword">private</span>:
<a name="l00130"></a>00130 
<a name="l00131"></a>00131     <span class="keywordtype">int</span> _numberCoordinate;<span class="comment">//Número de coordenadas para cada indivíduo</span>
<a name="l00132"></a>00132     std::vector&lt;int&gt; _cuttof_point;<span class="comment">//Ponto de corte para cada coordenada de um individuo</span>
<a name="l00133"></a>00133     std::vector&lt;bool&gt; _aleatory;<span class="comment">//Informação se é aleatorio ou nao o ponto de corte para cada coordenada</span>
<a name="l00134"></a>00134 };
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00137"></a><a class="code" href="classcross__over.html#aa3561392e40e80aec88cc88aab4f988d">00137</a> <a class="code" href="classcross__over.html#aa3561392e40e80aec88cc88aab4f988d">cross_over&lt;_ty,_realTy&gt;::cross_over</a> (<a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;</a>* _to_apply_operator,<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; number_coordinate,<span class="keyword">const</span> <span class="keywordtype">float</span>&amp; probability,<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; CP,<span class="keyword">const</span> <span class="keywordtype">bool</span>&amp; aleatory)
<a name="l00138"></a>00138 :<a class="code" href="classgenetic__operator.html">genetic_operator</a>&lt;_ty,_realTy&gt;(_to_apply_operator,probability)
<a name="l00139"></a>00139 {
<a name="l00140"></a>00140   _numberCoordinate = number_coordinate;
<a name="l00141"></a>00141   <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = _numberCoordinate; i !=0; --i)
<a name="l00142"></a>00142   {
<a name="l00143"></a>00143     _aleatory.push_back(aleatory);
<a name="l00144"></a>00144     _cuttof_point.push_back(CP);
<a name="l00145"></a>00145   }
<a name="l00146"></a>00146 }
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00149"></a><a class="code" href="classcross__over.html#af8d2e8a02552551f3edd692793816de3">00149</a> <span class="keywordtype">void</span> <a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">cross_over&lt;_ty,_realTy&gt;::CrossOver</a> (_ty&amp; coord_1, _ty&amp; coord_2, <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; CP)
<a name="l00150"></a>00150 {
<a name="l00151"></a>00151   _ty temp_1,temp_2,mask_high,mask_low;
<a name="l00152"></a>00152   
<a name="l00153"></a>00153   mask_low = _ty(pow(2,CP));
<a name="l00154"></a>00154   mask_low -= 1;<span class="comment">//faz uma máscara com os bits baixos</span>
<a name="l00155"></a>00155   mask_high = ~mask_low;<span class="comment">//faz uma máscara com os bits altos</span>
<a name="l00156"></a>00156   
<a name="l00157"></a>00157   temp_1 = coord_1 &amp; mask_low;<span class="comment">//grava os bits baixos de coord_1 em temp_1</span>
<a name="l00158"></a>00158   coord_1 = coord_1 &amp; mask_high;<span class="comment">//limpa os bits baixos de coord_1</span>
<a name="l00159"></a>00159   
<a name="l00160"></a>00160   temp_2 = coord_2 &amp; mask_low;<span class="comment">//grava os bits baixos de coord_2 em temp_2</span>
<a name="l00161"></a>00161   coord_2 = coord_2 &amp; mask_high;<span class="comment">//limpa os bits baixos de coord_2</span>
<a name="l00162"></a>00162   
<a name="l00163"></a>00163   <span class="comment">//realiza p cruzamento</span>
<a name="l00164"></a>00164   coord_1 += temp_2;
<a name="l00165"></a>00165   coord_2 += temp_1;
<a name="l00166"></a>00166 }
<a name="l00167"></a>00167 
<a name="l00168"></a>00168 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00169"></a><a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">00169</a> <span class="keywordtype">bool</span> <a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">cross_over&lt;_ty,_realTy&gt;::CrossOver</a> ( <a class="code" href="classcoordinate.html">coordinate&lt;_ty,_realTy&gt;</a>&amp; c1, <a class="code" href="classcoordinate.html">coordinate&lt;_ty,_realTy&gt;</a>&amp; c2, <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; CP)
<a name="l00170"></a>00170 {  
<a name="l00171"></a>00171   <span class="keywordflow">if</span>(c1.<a class="code" href="classcoordinate.html#a617500d91429987c40541973ae80662a">GetIndice</a>()==c2.<a class="code" href="classcoordinate.html#a617500d91429987c40541973ae80662a">GetIndice</a>())
<a name="l00172"></a>00172   {<span class="comment">//se o cruzamento ocorrerá para duas dimensões idênticas</span>
<a name="l00173"></a>00173     <a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">CrossOver</a>(c1.<a class="code" href="classcoordinate.html#a67e7c384fd0641455b6629a7d6a9a344">GetValue</a>(),c2.<a class="code" href="classcoordinate.html#a67e7c384fd0641455b6629a7d6a9a344">GetValue</a>(),CP);
<a name="l00174"></a>00174     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00175"></a>00175   }
<a name="l00176"></a>00176   <span class="keywordflow">else</span>
<a name="l00177"></a>00177     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00178"></a>00178 }
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00181"></a><a class="code" href="classcross__over.html#a1a840a73fa36cc7f4f7e769f78d73e81">00181</a> <span class="keyword">const</span> <span class="keywordtype">char</span>&amp; <a class="code" href="classcross__over.html#a1a840a73fa36cc7f4f7e769f78d73e81">cross_over&lt;_ty,_realTy&gt;::WalkOnPopulationHook</a> (<a class="code" href="classindividual.html">individual&lt;_ty,_realTy&gt;</a>&amp; <span class="keywordtype">id</span>)
<a name="l00182"></a>00182 {
<a name="l00183"></a>00183   <span class="comment">//se o indivíduo possui um par</span>
<a name="l00184"></a>00184   <span class="keywordflow">if</span>(<span class="keywordtype">id</span>.GetPair() != NULL)
<a name="l00185"></a>00185   {<span class="comment">//Se os individuos estao realmente casados</span>
<a name="l00186"></a>00186     <span class="keywordflow">if</span> (<span class="keywordtype">id</span>.GetPair()-&gt;GetPair() == &amp;<span class="keywordtype">id</span>)
<a name="l00187"></a>00187     {
<a name="l00188"></a>00188       <span class="keywordtype">int</span> i = 0;
<a name="l00189"></a>00189       <span class="keywordflow">for</span> (<span class="keyword">typename</span> <a class="code" href="classindividual.html">individual&lt;_ty,_realTy&gt;::it_</a> it = <span class="keywordtype">id</span>.begin(); it != <span class="keywordtype">id</span>.end(); ++it)
<a name="l00190"></a>00190       {
<a name="l00191"></a>00191         <span class="keywordflow">if</span> (<a class="code" href="classgenetic__operator.html">genetic_operator&lt;_ty,_realTy&gt;::_probability</a> &gt; <a class="code" href="classgenetic__operator.html">genetic_operator&lt;_ty,_realTy&gt;::GenerateRandom</a>())
<a name="l00192"></a>00192         {
<a name="l00193"></a>00193           <span class="comment">//Realiza o Cruzamento</span>
<a name="l00194"></a>00194           <span class="keywordflow">if</span> (_aleatory[i])
<a name="l00195"></a>00195           {<span class="comment">//se for cruzamento do tipo aleatório, gera o ponto de corte aleatório</span>
<a name="l00196"></a>00196             <span class="keywordtype">int</span> new_pc;
<a name="l00197"></a>00197             <span class="comment">//Gera o número aleatório do tamanho da coordenada</span>
<a name="l00198"></a>00198             <span class="keywordflow">do</span>
<a name="l00199"></a>00199             {
<a name="l00200"></a>00200               new_pc =  <a class="code" href="classgenetic__operator.html#a406eeb5144dd74698fcd9a120f021aba">genetic_operator&lt;_ty,_realTy&gt;::GenerateRandom</a>(_ty((*it)-&gt;GetSize()-1));
<a name="l00201"></a>00201             }<span class="keywordflow">while</span> ((new_pc&lt;0)&amp;&amp;(new_pc &gt;= (*it)-&gt;GetSize()));
<a name="l00202"></a>00202 
<a name="l00203"></a>00203             _cuttof_point[i] = new_pc;<span class="comment">//seta o novo ponto de corte aleatório</span>
<a name="l00204"></a>00204           }
<a name="l00205"></a>00205           <span class="comment">//Realiza propriamente o cruzamento</span>
<a name="l00206"></a>00206           <a class="code" href="classcross__over.html#ace759185adf45d08ece996286c69542f">CrossOver</a>(*(*it),*(*(<span class="keywordtype">id</span>.GetPair()-&gt;begin()+i)),_cuttof_point[i]);
<a name="l00207"></a>00207         }
<a name="l00208"></a>00208         i++;
<a name="l00209"></a>00209       }
<a name="l00210"></a>00210       <span class="comment">//Separa os indivíduos para a próxima geração</span>
<a name="l00211"></a>00211       <a class="code" href="classindividual.html">individual&lt;_ty,_realTy&gt;::SeparetePair</a>(<span class="keywordtype">id</span>,*<span class="keywordtype">id</span>.GetPair());
<a name="l00212"></a>00212       <span class="keywordflow">return</span> def::genetic_operator::go_forward;
<a name="l00213"></a>00213     }
<a name="l00214"></a>00214   }
<a name="l00215"></a>00215   <span class="keywordflow">return</span> def::genetic_operator::go_forward;
<a name="l00216"></a>00216 }
<a name="l00217"></a>00217 
<a name="l00218"></a>00218 
<a name="l00219"></a>00219 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00220"></a><a class="code" href="classcross__over.html#a1febad7c46ec396173e099372d50839e">00220</a> <span class="keyword">const</span> <span class="keywordtype">char</span>&amp; <a class="code" href="classcross__over.html#a1febad7c46ec396173e099372d50839e">cross_over&lt;_ty,_realTy&gt;::WalkOnIndividualHook</a> (<a class="code" href="classcoordinate.html">coordinate&lt;_ty,_realTy&gt;</a>&amp; coo)
<a name="l00221"></a>00221 {
<a name="l00222"></a>00222   <span class="keywordflow">return</span> def::genetic_operator::go_up;
<a name="l00223"></a>00223 }
<a name="l00224"></a>00224 
<a name="l00225"></a>00225 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00226"></a><a class="code" href="classcross__over.html#a241401bf77d5c8c465991baa90b1d01b">00226</a> <span class="keywordtype">void</span> <a class="code" href="classcross__over.html#a241401bf77d5c8c465991baa90b1d01b">cross_over&lt;_ty,_realTy&gt;::MakePairs</a> (<span class="keywordtype">void</span>)
<a name="l00227"></a>00227 {
<a name="l00228"></a>00228 
<a name="l00229"></a>00229   <span class="keywordflow">for</span> (<span class="keyword">typename</span> <a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;::it_</a> it = <a class="code" href="classgenetic__operator.html">genetic_operator&lt;_ty,_realTy&gt;::_to_apply_operator</a>-&gt;begin();
<a name="l00230"></a>00230                                              it != <a class="code" href="classgenetic__operator.html">genetic_operator&lt;_ty,_realTy&gt;::_to_apply_operator</a>-&gt;end();
<a name="l00231"></a>00231                                              ++it)
<a name="l00232"></a>00232   {
<a name="l00233"></a>00233     <span class="comment">//Se o indivíduo ainda não possui parceiro</span>
<a name="l00234"></a>00234     <span class="keywordflow">if</span> ( (*it)-&gt;GetPair() == NULL )
<a name="l00235"></a>00235     {
<a name="l00236"></a>00236       <span class="keywordtype">int</span> indice;
<a name="l00237"></a>00237       <span class="keywordtype">bool</span> keep_whiling;
<a name="l00238"></a>00238       <a class="code" href="classindividual.html">individual&lt;_ty,_realTy&gt;</a>* got_pair;
<a name="l00239"></a>00239       <span class="comment">//Acha um indivíduo sem par</span>
<a name="l00240"></a>00240       <span class="keywordflow">do</span>
<a name="l00241"></a>00241       {
<a name="l00242"></a>00242         _ty max = <a class="code" href="classgenetic__operator.html">genetic_operator&lt;_ty,_realTy&gt;::_to_apply_operator</a>-&gt;GetNumerOfIndividuals();
<a name="l00243"></a>00243         max -= 1;
<a name="l00244"></a>00244         indice = <a class="code" href="classgenetic__operator.html#a406eeb5144dd74698fcd9a120f021aba">genetic_operator&lt;_ty,_realTy&gt;::GenerateRandom</a>(max);
<a name="l00245"></a>00245         got_pair = *(<a class="code" href="classgenetic__operator.html">genetic_operator&lt;_ty,_realTy&gt;::_to_apply_operator</a>-&gt;begin()+indice);
<a name="l00246"></a>00246         <span class="keywordflow">if</span> ((got_pair != NULL) &amp;&amp; (got_pair-&gt;<a class="code" href="classindividual.html#ad9f03da405f7f069cbafd11387fbf5f9">GetPair</a>() == NULL) &amp;&amp; (got_pair != *it) )
<a name="l00247"></a>00247           keep_whiling = <span class="keyword">false</span>;
<a name="l00248"></a>00248         <span class="keywordflow">else</span>
<a name="l00249"></a>00249           keep_whiling = <span class="keyword">true</span>;
<a name="l00250"></a>00250       } <span class="keywordflow">while</span>(keep_whiling);
<a name="l00251"></a>00251 
<a name="l00252"></a>00252       <span class="comment">//Marca os pares</span>
<a name="l00253"></a>00253       <a class="code" href="classindividual.html">individual&lt;_ty,_realTy&gt;::MakePair</a> (*(*it),*got_pair);
<a name="l00254"></a>00254     }
<a name="l00255"></a>00255   }
<a name="l00256"></a>00256 }
<a name="l00257"></a>00257 
<a name="l00258"></a>00258 <span class="preprocessor">#endif //CROOS_OVER_H</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Todos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Arquivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Funções</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variáveis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Definições de Tipos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Amigas</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Gerado em Sat Oct 30 13:47:50 2010 por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
